package com.rong.creatmodel.buildermodel.buildhouse;

public class Client {
    public static void main(String[] args) {
        // 盖普通房子
        CommonHouse commonHouse = new CommonHouse();
        // 准备创建房子的指挥者
        HouseDirector houseDirector = new HouseDirector(commonHouse);
        // 完成建造
        House house = houseDirector.constructHouse();
        System.out.println("建造成功！");

        // 盖高楼
        HighBuilding highBuilding = new HighBuilding();
        houseDirector.setBuilder(highBuilding);
        houseDirector.constructHouse();
        System.out.println("建造成功！");

    }
}
